Omit app-specific metadata from generic daily Obsidian notes#892
Conversation
…t doesn't contain {{APP}}
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughObsidian daily notes now conditionally include app metadata, while settings preserve and display custom vault paths. An async test verifies metadata omission when ChangesObsidian plugin updates
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ot in detected list
|
Fix Manual Vault Selection Path in Settings: |
SeoFood
left a comment
There was a problem hiding this comment.
Approved. The frontmatter change is correct, the merge with current main is clean, and the focused Obsidian tests pass.
Non-blocking: the custom-vault picker change broadens the PR beyond the title and handwritten summary and has no dedicated regression test. The Verification code fence in the PR description is also left open. Please keep future changes scoped and make the full test command render correctly.
Summary
This PR ensures that application-specific metadata fields (
app,bundleId, andurl) are omitted from the YAML frontmatter of Obsidian daily notes if the note is configured as a shared/generic note (i.e. the filename template does not contain the{{APP}}placeholder).Problem
When the daily note format is configured globally for the day (e.g.
{{DATE}}instead of{{DATE}} {{APP}}), it represents a shared daily log. Currently, the first transcription of the day writes the active app details into the file's YAML frontmatter. Subsequent transcriptions from other apps append blocks to this file but cannot change the frontmatter, leaving incorrect and misleading app metadata at the top of the shared note.Solution
_dailyNoteFormatcontains the{{APP}}placeholder.{{APP}}, we passniltobuildFrontmatter(...)forappName,bundleId, andurl, preserving only thedate,language, andtags.Test Plan
scripts/pr-preflight.shtestAutoExportDailyNoteOmitsAppMetadataWhenFormatDoesNotContainAppto verify the frontmatter generation)Verification
Run the plugin SDK tests locally: